package research.ui.editors.tableeditors;

import org.eclipse.jface.viewers.ITableLabelProvider;

import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.swt.graphics.Image;

public abstract class EntityLabelProvider 
	extends LabelProvider
	implements ITableLabelProvider {
	
	public static String render(int i) {
		return Integer.toString(i);
	}
	
	public static String render(double d) {
		return isRealDouble(d) ? Double.toString(d) : "";
	}
	
	public static String render(boolean d) {
		return Boolean.toString(d);
	}
	
	public static String render(String note) {
		return note;
	}
	
	public static boolean isRealDouble(double d) {
		return !Double.isNaN(d) && !Double.isInfinite(d);
	}

	@Override
	public Image getColumnImage(Object element, int columnIndex) {
		return null;
	}
}
